#ifndef _NANDFLASH_H
#define _NANDFLASH_H
#include "s3c2440.h"
#include "uart.h"
#include "nandflash.h"

void flashinit(void);
unsigned int nf_readid(void);
unsigned char nf_readstat(void);
unsigned char nf_readcolumn(unsigned char half_sel,unsigned int addr);
void nf_readpage(unsigned int pageaddr,unsigned char *buf);
void nf_writepage(unsigned int pageaddr,unsigned char *buf);
void nf_eraseblk(unsigned int blkaddr);

void nf_copyback(unsigned int srcaddr,unsigned int dstaddr);
#endif